Changed from 'readline' to 'read' for better functionality