dirty release.. it works but it needs refactoring