Use mt_rand instead rand
Use abstract and parent classes