constructor added, code clean up