fixed form and added tests