cleaned up main and added abcd