Changed the code to reflect realistic behaviour