improved assignment1