Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneOfferService.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneOfferService.java	(revision f25d07ebb042093cfa244826fdc53c72cc4e6854)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneOfferService.java	(revision e5b84dc652434cab61718f38889fc36867569866)
@@ -30,4 +30,14 @@
     }
 
+    public PhoneOffer getPhoneOffer(Long offerId){
+        boolean exists = phoneOfferRepository.existsById(offerId);
+
+        if(!exists)
+            throw new IllegalStateException("Phone offer with id "+offerId+" does not exist");
+
+        return phoneOfferRepository.findById(offerId).get();
+    }
+
+
     public List<String> getShops() {
         return phoneOfferRepository.findAll().stream()
Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneService.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneService.java	(revision f25d07ebb042093cfa244826fdc53c72cc4e6854)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/PhoneService.java	(revision e5b84dc652434cab61718f38889fc36867569866)
@@ -10,4 +10,5 @@
 import java.util.Comparator;
 import java.util.List;
+import java.util.Objects;
 import java.util.stream.Collectors;
 
@@ -22,6 +23,55 @@
 
     // TODO: insert logic to filter
-    public List<Phone> getPhones(){
-        return phoneRepository.findAll();
+    public List<Phone> getPhones(String shops, String brands, String sortBy, String priceRange, String searchValue){
+        List<Phone> phones = phoneRepository.findAll();
+
+
+        if(brands != null)
+        {
+            phones = phones.stream()
+                    .filter(phone -> brands.contains(phone.getBrand())).collect(Collectors.toList());
+        }
+
+        if(shops != null)
+        {
+            phones = phones.stream()
+                    .filter(phone -> phone.getPhoneOffers().stream().anyMatch(offer -> shops.contains(offer.getOffer_shop())))
+                    .collect(Collectors.toList());
+        }
+
+        if(priceRange != null)
+        {
+            int lowestPrice = Integer.parseInt(priceRange.split("-")[0]);
+            int highestPrice = Integer.parseInt(priceRange.split("-")[1]);
+            phones = phones.stream()
+                    .filter(phone -> phone.getLowestPrice() >= lowestPrice && phone.getLowestPrice() <= highestPrice)
+                    .collect(Collectors.toList());
+        }
+
+        if(searchValue != null && !Objects.equals(searchValue.stripIndent(), "")){
+            phones = phones.stream()
+                    .filter(phone -> phone.getBrand().toLowerCase().contains(searchValue.stripIndent().toLowerCase())
+                            || phone.getModel().toLowerCase().contains(searchValue.stripIndent().toLowerCase()))
+                    .collect(Collectors.toList());
+        }
+
+        phones = phones.stream().sorted(Comparator.comparing(Phone::getTotal_offers).reversed())
+                .collect(Collectors.toList());
+        if(sortBy != null)
+        {
+            if(sortBy.equals("ascending")) {
+                phones = phones.stream()
+                        .sorted(Comparator.comparing(Phone::getLowestPrice))
+                        .collect(Collectors.toList());
+            }
+
+            if(sortBy.equals("descending")) {
+                phones = phones.stream()
+                        .sorted(Comparator.comparing(Phone::getLowestPrice).reversed())
+                        .collect(Collectors.toList());
+            }
+        }
+
+        return phones;
     }
 
Index: phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/UserService.java
===================================================================
--- phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/UserService.java	(revision f25d07ebb042093cfa244826fdc53c72cc4e6854)
+++ phonelux-backend/src/main/java/finki/it/phoneluxbackend/services/UserService.java	(revision e5b84dc652434cab61718f38889fc36867569866)
@@ -40,8 +40,8 @@
            User userToRegister =  userRepository.findByEmail(user.getEmail()).get();
            if(userToRegister.getEnabled()) {
-               return ResponseEntity.badRequest().body("Error: Email "+user.getEmail()+" already taken!");
+               return ResponseEntity.badRequest().body("Error:Е-маил адресата е веќе зафатена!");
            }
            else {
-               return ResponseEntity.badRequest().body("Email "+user.getEmail()+" not activated!" );
+               return ResponseEntity.badRequest().body("Error:Профилот не е активиран. Потврдете на вашата е-маил адреса!" );
            }
        }
