Finally got everything working