fixed bugs and changed send method to POST