got rid of the horrible variable x