This method needs unit tests