some changes to the front end so it works with server