added tests + code for calculating points