finally working like beej