Fixed the code as per kibit and eastwood