fixing ALL THE BUGS