current version with bugs