Reffactor of stast class + junits